<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>MyBug系统--用户信息设置</title>
<link rel="stylesheet" href="plug-in/layui/css/layui.css"
	type="text/css"></link>
<script type="text/javascript" src="plug-in/layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script></head>

<body>
	<div class="layui-tab layui-tab-card">
		<ul class="layui-tab-title">
			<li class="layui-this">用户信息设置</li>
			<li>手机短信修改密码</li>
			<li>邮箱认证</li>

		</ul>
		<div class="layui-tab-content" style="height: 500px;">
			<div class="layui-tab-item layui-show"
				style="font-size:20px;line-height:40px;">欢迎使用户信息完善系统 !</div>
			<div class="layui-tab-item">
			<form class="layui-form" action="userinfocontr/updatepwd" method="post">
				<div class="layui-form-item">
					<label class="layui-form-label">手机号：</label>
					<div class="layui-input-block">
						<input type="text" name="phone" required lay-verify="required"
							style="width:190px;" placeholder="请输入手机号码" autocomplete="off"
							class="layui-input msg_phone">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">新密码：</label>
					<div class="layui-input-inline">
						<input type="password" name="password" required
							lay-verify="required" placeholder="请输入新密码" autocomplete="off"
							class="layui-input">
					</div>
					<div class="layui-form-mid layui-word-aux">输入你要修改的新密码</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">验证码：</label>
					<div class="layui-input-block">
						<input type="text" name="check" required lay-verify="required"
							style="width:190px;" placeholder="请输入验证码" autocomplete="off"
							class="layui-input">
						<div style="font-size:16px;margin-top:5px;"><input type="button" value="点击获取验证码" id="y_btn" /></div>
					</div>
					
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
			</div>
			<div class="layui-tab-item">
				<form  action="sendEmailContr/sendEmail" method="post">
				<label>请输入邮箱地址</label><input type="text" name="forEmail"/>
				<input type="submit" value="点击发送验证信息"/>
				</form>
			</div>

		</div>
	</div>
	
	
	
	<script type="text/javascript">
	$(function(){
		$("#y_btn").on("click",function(){
			var phone=$(".msg_phone").val().trim();
			console.log(phone);
			if(phone==0){
				layer.msg("请输入手机号码！");
			}else{
				$.ajax({
					url:"sendMsgContr/sendmsg?phone="+phone+"&type=1",
					success:function(msg){
					//alert("1");
					if(0==msg){
					layer.msg("请输入正确的手机号码!");
					}else if(msg==1){
					layer.msg("验证码已发送请查收!");
					}
					
					}
				});
			}
		
		});
	});
		
	
	</script>
</body>
</html>
